import winreg

key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Microsoft\Windows NT\CurrentVersion")
value = winreg.QueryValueEx(key, "ProductName")[0]
print(value)
